﻿using System;
using Microsoft.AspNetCore.Http;

namespace CommonUtils
{
    public class WebHit
    {
        public string Url;

        public string Path;

        public string Query;

        public string Host;

        public DateTime Time;

        public WebHit(HttpRequest request)
        {
            Url = request.GetUrl();
            //LogUtil.PrintInfo(request.Path);
            //LogUtil.PrintInfo(request.QueryString);
            Path = request.Path;
            Query = request.QueryString.ToString();
            Host = request.HttpContext.Connection.RemoteIpAddress.ToString();
            Time = DateTime.Now;
        }

        public WebHit()
        {

        }
    }
}
